<php>
    if(!$item['form']['type'] || $item['form']['type'] == 'select'){
</php>
<select class="form-control {$item.form.class}" name="{$item.name}" {$item.form.attr} api="Dict/info/code/{$item['option']['dict']}" default="{$item.value}"></select>
<php>
    }else{
    $data = \Common\Service\DictService::getInstance()->getDict($item['option']['dict']);
    if($data && $data['map']){
        foreach($data['map'] as $k=>$v){
            if($item['form']['type'] == 'radio'){
</php>
<label class="radio-inline">
    <input type="radio" class="{$item.form.class}" name="{$item.name}" value="{$k}" <php>if($item['value'] == $k){echo 'checked';}</php> {$item.form.attr}>{$v}
</label>
<php> }else if($item['form']['type'] == 'checkbox'){ </php>
<label class="checkbox-inline">
    <input type="checkbox" class="{$item.form.class}" name="{$item.name}[]" value="{$k}" <php>if($item['value'] == $k){echo 'checked';}</php> {$item.form.attr}>{$v}
</label>
<php> } } } }</php>